$(function(){
  download();
  function download(){
    $.ajax({
        type:"get",
        url:"./assets/data/goodsList2.json",
        success:function(arr){
            $(`<div data-v-61428f58 class = 'section'>
            <div data-v-61428f58 class = 'components-list-box'>
                <div data-v-a2d6c756 class="channel-product-imgText">
                    <div data-v-a2d6c756 class = 'channel-product-top'>
                        <div data-v-a2d6c756 class = 'product-cell shadow product_with_tag product_tag_1'>
                            <div data-v-a2d6c756 class = 'figure'>
                                <a href="descxxx.html?product_id=${arr[0].product_id}">
                                    <img data-v-a2d6c756 style = 'background-color: rgb(178, 184, 205);' src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/097f0cf50bebae139744def8bc62d6df.jpg?w=1708&h=868" alt=""/>
                                </a>
                            </div>
                            <div data-v-a2d6c756 class = 'content'>
                                <h3 data-v-a2d6c756 class = 'title'>
                                    <a data-v-a2d6c756 href="descxxx.html?product_id=${arr[0].product_id}">
                                        Redmi K20 Pro 
                                    </a>
                                </h3>
                                <p data-v-a2d6c756 class = 'desc'>骁龙855处理器, 弹出式极界全面屏</p>
                                <p data-v-a2d6c756 class = 'price'>
                                    <strong data-v-a2d6c756>2299</strong>元
                                    <span data-v-a2d6c756>起</span>
                                    <del data-v-a2d6c756>2599元</del>
                                </p>
                                <p data-v-a2d6c756 class = 'link'>
                                    <a data-v-a2d6c756 href="#">立即购买</a>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>`).appendTo(".page-main .app-body");
        for(var i=1;i<arr.length;i++){
            if(i%2==1){
                var row=$(`<div data-v-61428f58 class = 'section'>
            <div data-v-61428f58 class = 'components-list-box'>
                <div data-v-45ef62b1 class = 'channel-product channel-product-two4'>
                    <div data-v-45ef62b1 class = 'row'>
                        
                    </div>
                </div>
            </div>
        </div>`);
        row.appendTo(".page-main .app-body");
            };
        $(`<div data-v-45ef62b1 class = 'span10 product-cell shadow'>
        <div data-v-45ef62b1 class = 'figure'>
            <a data-v-45ef62b1 href="descxxx.html?product_id=${arr[i].product_id}" class = 'exposure'>
                <img data-v-45ef62b1 style = 'background-color: rgb(189, 193, 217);' src="${arr[i].image}" alt=""/>
            </a>
        </div>
        <h3 data-v-45ef62b1 class = 'title'>
            <a data-v-45ef62b1 href="descxxx.html?product_id=${arr[i].product_id}">${arr[i].name}</a>
        </h3>
        <p data-v-45ef62b1 class = 'desc'>${arr[i].desc}</p>
        <p data-v-45ef62b1 class = 'price'>
            <strong data-v-45ef62b1>${arr[i].price}</strong>元
            <span data-v-45ef62b1>起</span>
            <del data-v-45ef62b1>${arr[i].del}元</del>
        </p>`).appendTo(row.find(".row"));
        };
        },
        error:function(msg){
            console.log(msg);
        }
    })
};
})